layui.define(function(exports) {
    var base={
        progress: function (value) {
            parent.layui.$('div.layui-progress[lay-filter="base-progress"]').show()
            parent.layui.element.progress('base-progress', value);
            if (value.split("%")[0]==100){
                setTimeout(function () {
                    parent.layui.$('div.layui-progress[lay-filter="base-progress"]').fadeOut(500)
                }, 2000)
            }
        },
        hideProgress: function () {
            parent.layui.$('div.layui-progress[lay-filter="base-progress"]').fadeOut(500)
        }
    }
    var progress={
        progress: function (value) {
            return base.progress(value)
        },
        hide: function () {
            return base.hideProgress()
        }
    }
    exports("progress", progress);
})